package com.heima.admin.controller;

import com.heima.apis.wemedia.IWemediaClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmSensitiveDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/v1/sensitive")
public class AdminSensitiveController {
    @Autowired
    private IWemediaClient iWemediaClient;
    @DeleteMapping("/del/{id}")
    public ResponseResult deleteById(@PathVariable Integer id){
       return iWemediaClient.deleteById(id);
    }

    @PostMapping("/list")
    public ResponseResult list(@RequestBody WmSensitiveDto dto){
        return iWemediaClient.list(dto);
    }

    @PostMapping("/save")
    public ResponseResult sensitiveSave(@RequestBody WmSensitiveDto dto){
       return iWemediaClient.sensitiveSave(dto);
    }

    @PostMapping("/update")
    public ResponseResult update(@RequestBody WmSensitiveDto dto){
       return iWemediaClient.update(dto);
    }
}
